894ce8
@@ -60,6 +60,7 @@
import org.apache.hadoop.hbase.replication.ReplicationQueues;
 import org.apache.hadoop.hbase.replication.SystemTableWALEntryFilter;
 import org.apache.hadoop.hbase.replication.WALEntryFilter;
 import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
 import org.apache.hadoop.hbase.util.FSUtils;
 import org.apache.hadoop.hbase.util.Threads;
 import org.apache.hadoop.hbase.wal.DefaultWALProvider;
@@ -640,7 +641,7 @@
public class ReplicationSource extends Thread
             sleepMultiplier = 1;
             // if there was nothing to ship and it's not an error
             // set "ageOfLastShippedOp" to <now> to indicate that we're current
-            metrics.setAgeOfLastShippedOp(System.currentTimeMillis(), walGroupId);
+            metrics.setAgeOfLastShippedOp(EnvironmentEdgeManager.currentTime(), walGroupId);
           }
           if (sleepForRetries("Nothing to replicate", sleepMultiplier)) {
             sleepMultiplier++;
